#------------------------------------------------------------------------------
# Bindings
#------------------------------------------------------------------------------

# Vi-like bindings for movement
bind "main" "j" = "scroll-down"
bind "main" "k" = "scroll-up"
bind "main" "J" = "move-page-down"
bind "main" "K" = "move-page-up"
bind "main" "H" = "history-move-back"
bind "main" "L" = "history-move-forward"
bind "main" "h" = "move-link-prev"
bind "main" "l" = "move-link-next"
bind "main" "Ctrl-g" = "move-document-start"
bind "main" "G" = "move-document-end"

# In dialogs with both edit fields and checkboxes, moving down will siwch to
# "menu" mode. Defining the item movement key to be same as the "down" action in
# "edit" mode, makes for good UX
bind "edit" "Ctrl-l" = "down"
bind "menu" "Ctrl-l" = "next-item"
bind "menu" "Ctrl-h" = "previous-item"

# Miscellaneous actions
bind "main" "S" = "save-formatted"
bind "main" "q" = "really-quit"
bind "main" "R" = "reload"
bind "main" "D" = "download-manager"

#------------------------------------------------------------------------------
# CSS stylesheet
#------------------------------------------------------------------------------

set document.css.stylesheet = "stylesheet.css"

#------------------------------------------------------------------------------
# Ui styling
#------------------------------------------------------------------------------

set document.colors.vlink = "purple"
set document.colors.dirs = "orange"
set document.browse.links.active_link.colors.background = "navy"

# Tabs
set ui.colors.color.tabs.normal.background = "black"
set ui.colors.color.tabs.normal.text = "white"
set ui.colors.color.tabs.selected.background = "dimGray"
set ui.colors.color.tabs.selected.text = "white"
set ui.colors.color.tabs.separator.background = "black"
set ui.colors.color.tabs.separator.text = "white"

# Title bar 
set ui.colors.color.title.title-bar.background = "black"
set ui.colors.color.title.title-bar.text = "white"
set ui.colors.color.title.title-text.background = "black"
set ui.colors.color.title.title-text.text = "white"

# Status bar
set ui.colors.color.status.status-bar.background = "black"
set ui.colors.color.status.status-bar.text = "white"
set ui.colors.color.status.status-text.background = "black"
set ui.colors.color.status.status-text.text = "white"

# Dialog box
#------------------------------------------------------------------------------

set ui.colors.color.dialog.generic.background = "black"
set ui.colors.color.dialog.generic.text = "white"
set ui.colors.color.dialog.frame.background = "black"
set ui.colors.color.dialog.frame.text = "white"

set ui.colors.color.dialog.title.background = "black"
set ui.colors.color.dialog.title.text = "white"

set ui.colors.color.dialog.text.background = "black"
set ui.colors.color.dialog.text.text = "white"

set ui.colors.color.dialog.field.background = "white"
set ui.colors.color.dialog.field.text = "black"
set ui.colors.color.dialog.field-text.background = "white"
set ui.colors.color.dialog.field-text.text = "black"

set ui.colors.color.dialog.button.background = "white"
set ui.colors.color.dialog.button.text = "black"
set ui.colors.color.dialog.button-shortcut.background = "black"
set ui.colors.color.dialog.button-shortcut.text = "white"

set ui.colors.color.dialog.button-selected.background = "black"
set ui.colors.color.dialog.button-selected.text = "white"
set ui.colors.color.dialog.button-shortcut-selected.background = "white"
set ui.colors.color.dialog.button-shortcut-selected.text = "black"

# Dialog checkbox
#------------------------------------------------------------------------------

set ui.colors.color.dialog.checkbox.text = "white"
set ui.colors.color.dialog.checkbox.background = "black"
set ui.colors.color.dialog.checkbox-selected.text = "black"
set ui.colors.color.dialog.checkbox-selected.background = "white"

#------------------------------------------------------------------------------
# Miscellaneous options
# These options are usually set automatiacally by elinks itself, but since
# elinks writes them in a disorganized manner, a condensed the useful ones here.
#------------------------------------------------------------------------------

# Language will be derived from the enviroment
set ui.language = "System" 

# Xterm options
set terminal.xterm.italic = 1
set terminal.xterm.colors = 4
set terminal.xterm.block_cursor = 1
set terminal.xterm.utf_8_io = 1
set terminal.xterm.type = 2

# Tmux options
set terminal.tmux-256color.colors = 4
set terminal.tmux-256color.type = 2
set terminal.tmux-256color.underline = 1
set terminal.tmux-256color.strike = 1
set terminal.tmux-256color.italic = 1
set terminal.tmux-256color.transparency = 0
set terminal.tmux-256color.block_cursor = 1
set terminal.tmux-256color.utf_8_io = 1

# Switch fonts for line drawing, only makes sense in the linux console
set terminal.tmux-256color.m11_hack = 0
